package com.hl.mapper;

import com.hl.domain.*;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* @author 好好学习
* @description 针对表【course(课程表，存储所有课程信息)】的数据库操作Mapper
* @createDate 2024-09-05 19:23:51
* @Entity com.hl.domain.Course
*/
public interface CourseMapper {

    //根据id删除课程
    int deleteByPrimaryKey(Long id);

    //添加课程接口------
    int insert(Course record);

    int insertSelective(Course record);

    Course selectByPrimaryKey(Long id);

    //根据id进行修改
    int updateByPrimaryKeySelective(Course record);

    int updateByPrimaryKey(Course record);


    //查询课程信息
    List<Course> selectAll(Integer pageNum,Integer pageSize);


    //多条件动态查询课程信息-----
    List<Course> selectAllSql(@Param("courseName") String  courseName, @Param("type")String  type, @Param("consultName")String  consultName, @Param("createtime") Date createtime,@Param("updatetime") Date updatetime);



    //课程首页轮播图-------查10条数据
    List<Course> selectCourseLunbo();

    //--动态查询
    List<Course> selectCoursesByCondition(Map<String, Object> params);

    //查询课程下的名师介绍
    TeacherInfoDTO queryTeacherIntro(Integer courseId);

    //课堂交流回答
    List<CourseQuestion> getCourseQuestions(@Param("courseId") Integer courseId);


    //动态展示课程数据-------------
    List<CourseQuerySort> dynamicQueryCourses(CourseQueryDTO queryDTO);

	 List<Course> selectAllByAssociation();
    List<Course> selectAllByAssociation2();
}
